/**
 * Copy right reserved by jkp2k@163.com
 * Version: 1.0
 */
package com.yuanmei.charts;

import android.content.Context;
import android.widget.TextView;

import com.github.mikephil.charting.components.MarkerView;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.highlight.Highlight;

import com.yuanmei.views.R;

public class BottomMarkerView extends MarkerView {
    /**
     * Constructor. Sets up the MarkerView with a custom layout resource.
     *
     * @param context
     * @param layoutResource the layout resource to use for the MarkerView
     */
    private TextView markerTv;
    private String time;

    public BottomMarkerView(Context context, int layoutResource) {
        super(context, layoutResource);
        markerTv = (TextView) findViewById(R.id.marker_tv);
        markerTv.setTextSize(10);
    }

    public void setData(String time) {
        this.time = time;
    }

    @Override
    public void refreshContent(Entry e, Highlight highlight) {
        markerTv.setText(time);
    }
}
